home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / pbmpl91d.zip / PBMPLUS / MAN / PPMQUANT.MAN < prev    next >
Text File  |  1993-01-08  |  2KB  |  70 lines

  1.  
  2.  
  3. ppmquant(1)                Unix Programmer's Manual                ppmquant(1)
  4.  
  5.  
  6. NAME
  7.      ppmquant - quantize the colors in a portable pixmap down to  a  specified
  8.      number
  9.  
  10. SYNOPSIS
  11.      ppmquant [-floyd|-fs] ncolors [ppmfile]
  12.                            -------  -------
  13.      ppmquant [-floyd|-fs] -map mapfile [ppmfile]
  14.                                 -------  -------
  15.  
  16. DESCRIPTION
  17.      Reads a portable  pixmap  as  input.   Chooses  ncolors  colors  to  best
  18.                                                      -------
  19.      represent the image, maps the existing colors to the new ones, and writes
  20.      a portable pixmap as output.
  21.  
  22.      The quantization method is Heckbert's "median cut".
  23.  
  24.      Alternately, you can skip the color-choosing step by specifying your  own
  25.      set of colors with the -map flag.  The mapfile is just a ppm file; it can
  26.                                             -------           ---
  27.      be any shape, all that matters is the colors in  it.   For  instance,  to
  28.      quantize down to the 8-color IBM TTL color set, you might use:
  29.          P3
  30.          8 1
  31.          255
  32.            0   0   0
  33.          255   0   0
  34.            0 255   0
  35.            0   0 255
  36.          255 255   0
  37.          255   0 255
  38.            0 255 255
  39.          255 255 255
  40.      If you want to quantize one pixmap to use the colors in another one, just
  41.      use  the  second one as the mapfile.  You don't have to reduce it down to
  42.      only one pixel of each color, just use it as is.
  43.  
  44.      The -floyd/-fs flag  enables  a  Floyd-Steinberg  error  diffusion  step.
  45.      Floyd-Steinberg   gives   vastly  better  results  on  images  where  the
  46.      unmodified quantization has banding or other artifacts,  especially  when
  47.      going to a small number of colors such as the above IBM set.  However, it
  48.      does take substantially more CPU time, so the default is off.
  49.  
  50.      All flags can be abbreviated to their shortest unique prefix.
  51.  
  52. REFERENCES
  53.      "Color Image Quantization for Frame Buffer  Display"  by  Paul  Heckbert,
  54.      SIGGRAPH '82 Proceedings, page 297.
  55.  
  56. SEE ALSO
  57.      ppmquantall(1), pnmdepth(1), ppmdither(1), ppm(5)
  58.  
  59. AUTHOR
  60.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                12 January 1991                               1
  69.  
  70.